package com.fr.base.core.image4j.io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;

public class LittleEndianRandomAccessFile extends RandomAccessFile
{
  public LittleEndianRandomAccessFile(File paramFile, String paramString)
    throws FileNotFoundException
  {
    super(paramFile, paramString);
  }

  public LittleEndianRandomAccessFile(String paramString1, String paramString2)
    throws FileNotFoundException
  {
    super(paramString1, paramString2);
  }

  public short readShortLE()
    throws IOException
  {
    short s = super.readShort();
    s = EndianUtils.swapShort(s);
    return s;
  }

  public int readIntLE()
    throws IOException
  {
    int i = super.readInt();
    i = EndianUtils.swapInteger(i);
    return i;
  }

  public float readFloatLE()
    throws IOException
  {
    float f = super.readFloat();
    f = EndianUtils.swapFloat(f);
    return f;
  }

  public long readLongLE()
    throws IOException
  {
    long l = super.readLong();
    l = EndianUtils.swapLong(l);
    return l;
  }

  public double readDoubleLE()
    throws IOException
  {
    double d = super.readDouble();
    d = EndianUtils.swapDouble(d);
    return d;
  }

  public void writeShortLE(short paramShort)
    throws IOException
  {
    paramShort = EndianUtils.swapShort(paramShort);
    super.writeShort(paramShort);
  }

  public void writeIntLE(int paramInt)
    throws IOException
  {
    paramInt = EndianUtils.swapInteger(paramInt);
    super.writeInt(paramInt);
  }

  public void writeFloatLE(float paramFloat)
    throws IOException
  {
    paramFloat = EndianUtils.swapFloat(paramFloat);
    super.writeFloat(paramFloat);
  }

  public void writeLongLE(long paramLong)
    throws IOException
  {
    paramLong = EndianUtils.swapLong(paramLong);
    super.writeLong(paramLong);
  }

  public void writeDoubleLE(double paramDouble)
    throws IOException
  {
    paramDouble = EndianUtils.swapDouble(paramDouble);
    super.writeDouble(paramDouble);
  }
}